import React from 'react';
import Index from '@/view/index';
import Login from '@/view/login';
import Error from '@/components/error';
import BlogDetail from '@/view/blogDetail';
import CategoryDetail from '@/view/categoryDetail';
import Category from '@/view/category';
import TimeRoller from '@/view/timeRoller';

const routes = [
    {
        path: '/login',
        element: <Login />
    },
    {
        path: '/',
        element: <Index />,
    },
		{
			  path: '/blogDetail/:id',
				element: <BlogDetail />,
		},
		{
			path: '/categoryDetail/:title/:id',
			element: <CategoryDetail />,
		},
		{
			path: '/category',
			element: <Category />,
		},
		{
			path: '/timeroller',
			element: <TimeRoller />,
		},
    {
        path: '/*',
        element: <Error />
    }
];

export default routes;
